﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Style.eCommerce.API.APIReferences.ComercioLibre;
using Style.eCommerce.API.Models;

namespace Style.eCommerce.API.Mapper
{
    public class EntityMapper
    {
        public static Product Map(CLProduct p)
        {
            return new Product()
            {
                Id = p.Id,
                Images = p.Images,
                Price = p.Price,
                Stock = p.Stock,
                Title = p.Title
            };
        }

        public static ProductSummary Map(CLProductSummary p)
        {
            return new ProductSummary()
            {
                Id = p.Id,
                Image = p.Image,
                Title = p.Title
            };
        }
    }
}